Module Controller gives access to the program from modules. You may access other methods, but it is not suggested...
To create a module, subclass from Module.h. Note that it already has an id for the ModuleController called TheModuleController. It also imports the Module Controller, and from there imports the rest of the program, the appkit, the soundkit, stdio, math, and string, so it's unlikely you'd need to import or include much.
*/
#import <objc/Object.h>
#import "Imports.h"
@interface ModuleController:Object
{
id CompactPanel;
id TheFileController;
id TheInfoManager;
id TheSoundManager;
id TheEditController;
id AdjustButton;
BOOL GoAhead; // The Compact Panel has been okayed.
}
/*---------On pain of death, do not call these methods-they are internal---------*/
- init;
- TurnOffMenu:sender;
- TurnOnMenu:sender;
- Cancelled:sender;
- Okayed:sender;
/*---------------------METHODS PROPERLY CALLABLE BY MODULES----------------------*/
/* NOTE: there are other methods in various objects in this program that may be
utilized if need be, but it is not suggested, as they may change with later
versions of this program (if any!), and they are not guaranteed to not have
unforseen side effects, or do what they seem to do. The following methods
have been provided in this object as a link to the main program for modules,
and are the recommended methods that modules may call.
To call any non-module object in this program, as well as in the appkit and
soundkit, just #include "ModuleController.h".
*/
- (BOOL) RunCompactPanel:sender;/* Runs a "The operation requires compacting the
sound. Are you sure you want to do this?" panel.
Returns TRUE if the person wants the operation
to go ahead and compact samples, and FALSE if the
person cancelled the operation. */
- CurrentSound:sender; /* Returns the Current Sound, NULL if none*/
- CurrentSoundView:sender; /* Returns the Current SoundView, NULL if none */
- CurrentWindow:sender; /* Returns the Current Window, NULL if none */
- CurrentScrollView:sender; /* Returns the Current ScrollView, NULL if none */
/* Note that the Current Window may be made
the main window, but is not to be made
the Key window. That is reserved for the
Console. */
- SoundChanged:ThisSound; /* Informs the program that a sound has been changed in
some way or edited. This sets the X on the top right
of the window to a broken X, and makes the program
pull up a "Save Before Close?" panel when the file
is closed, or when the program quits.*/
- ChangeSelection:sender; /* Informs the program that the selection of a
soundview has been changed. (Through a "Select All",
for instance. Requires selection to be for Current
Sound. */
- ResetSelection:sender; /* Informs the program that the selection of a
soundview has been set to 0 (as if the person just
clicked once in the window--all grey marking
disappears. Requires selection to be for Current
Sound. */
- ChangeInfo:ThisSound; /* Informs the program that any sound information has
been changed (sampling rate, number of samples,
sample size--8 or 16 bits, fragmentation, info string,
etc. */
- ZoomChanged:sender; /* Informs the program that the reduction factor for
a soundview has been changed. Requires zoom to be
for Current Sound. */
- Stop:sender; /* Stops whatever sound is playing or recording */
- Play:sender; /* Plays the current sound */
- (BOOL) IsPlaying; /* Returns TRUE if a sound is playing */
- (BOOL) IsRecording; /* Returns TRUE if a sound is recording */